[train] Clean up checkpoint config and trainer param deprecations#58022
Merged
justinvyu merged 8 commits intoray-project:masterfrom Oct 27, 2025
Merged
[train] Clean up checkpoint config and trainer param deprecations#58022justinvyu merged 8 commits intoray-project:masterfrom
justinvyu merged 8 commits intoray-project:masterfrom
Conversation
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request effectively deprecates checkpoint_at_end and checkpoint_frequency in CheckpointConfig, and resume_from_checkpoint and metadata in various Trainer constructors. The implementation for deprecation is solid, raising DeprecationWarning upon usage. The changes are consistent across the affected modules.
My main feedback is to improve the docstrings for the deprecated parameters. While the deprecation warnings at runtime are informative, updating the docstrings to include the reason for deprecation and the recommended alternative would greatly improve the developer experience for users browsing the API documentation. I've left specific suggestions on the relevant files.
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
landscapepainter
pushed a commit
to landscapepainter/ray
that referenced
this pull request
Nov 17, 2025
…y-project#58022) Deprecate `CheckpointConfig(checkpoint_at_end, checkpoint_frequency)` and mark the `resume_from_checkpoint, metadata` Trainer constructor arguments as deprecated in the docstrings. Update the "inspecting results" user guide doc code to show how to catch and inspect errors raised by trainer.fit(). The previous recommendation to check result.error is unusable because we always raise the error which prevents the user from accessing the result object. --------- Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Aydin-ab
pushed a commit
to Aydin-ab/ray-aydin
that referenced
this pull request
Nov 19, 2025
…y-project#58022) Deprecate `CheckpointConfig(checkpoint_at_end, checkpoint_frequency)` and mark the `resume_from_checkpoint, metadata` Trainer constructor arguments as deprecated in the docstrings. Update the "inspecting results" user guide doc code to show how to catch and inspect errors raised by trainer.fit(). The previous recommendation to check result.error is unusable because we always raise the error which prevents the user from accessing the result object. --------- Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Future-Outlier
pushed a commit
to Future-Outlier/ray
that referenced
this pull request
Dec 7, 2025
…y-project#58022) Deprecate `CheckpointConfig(checkpoint_at_end, checkpoint_frequency)` and mark the `resume_from_checkpoint, metadata` Trainer constructor arguments as deprecated in the docstrings. Update the "inspecting results" user guide doc code to show how to catch and inspect errors raised by trainer.fit(). The previous recommendation to check result.error is unusable because we always raise the error which prevents the user from accessing the result object. --------- Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: Future-Outlier <eric901201@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Deprecate
CheckpointConfig(checkpoint_at_end, checkpoint_frequency)and mark theresume_from_checkpoint, metadataTrainer constructor arguments as deprecated in the docstrings.Drive-by changes
Update the "inspecting results" user guide doc code to show how to catch and inspect errors raised by trainer.fit(). The previous recommendation to check result.error is unusable because we always raise the error which prevents the user from accessing the result object.
Related issues
#49454